/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 * <p>
 * https://www.renren.io
 * <p>
 * 版权所有，侵权必究！
 */

package com.blog.utils;

/**
 * Redis所有Keys
 *
 * @author Mark sunlightcs@gmail.com
 */
public class RedisKeys {

    public static final String MOSTHITKEY = "MOST_HIT_KEY";

    /**
     * 获得排名前三的值
     * @param key
     * @return
     */
    public static String getMosthitkey(Long key) {
        return MOSTHITKEY + ":" + key;
    }

    public static String getSysConfigKey(String key) {
        return "sys:config:" + key;
    }

    /**
     * 获取 文章 key
     * @param key 文章id
     * @return redis key
     */
    public static String getArticleKey(Long key) {
        return "blog:article:id" + key;
    }

    /**
     * 获取 用户 key
     * @param key 用户 id
     * @return redis key
     */
    public static String getUserKey(Long key) {
        return "blog:user:id" + key;
    }

    /**
     * 获取 分类 key
     * @param key 分类id
     * @return redis key
     */
    public static String getClassificationKey(Long key) {
        return "blog:classification:id" + key;
    }

}
